package jwlee.testjunit;

import junit.framework.TestCase;

public class TestHelloWorldByJunit extends TestCase {
	
	public TestHelloWorldByJunit(String name) {
		super(name);
	}

	public void testSay() {
		HelloWorld hw = new HelloWorld();
		assertEquals("Hello World!", hw.say());
	}

	public static void main(String[] args) {
		junit.textui.TestRunner.run(TestHelloWorldByJunit.class);
	}
}

class HelloWorld {
	public String say() {
		return "Hello World!";
	}
}

//javac -classpath .;D:\junit3.8.1\junit.jar TestHelloWorld.java
//java -classpath .;D:\junit3.8.1\junit.jar junit.textui.TestRunner TestHelloWorld
//java -classpath .;D:\junit3.8.1\junit.jar junit.swingui.TestRunner TestHelloWorld
//这时不须main